<?php

class CarregaContato{
	
	var $db;
	var $db2;
	var $tpl;
	
	
	function CarregaContato($tmp_path,$js_path) {
		$this->db = new Persist();
		$this->db2 = new Persist();
		$this->tpl = new TemplatePower(@$tmp_path.'tmpl.CarregaContato.html');
		
		$this->tpl->prepare();
		$this->tpl->assign('path',@$js_path.'libs.CarregaContato.js');
	}

	function escreveHtml(){
		$this->db->sql = "SELECT * FROM parametros";
		$this->db->ler();
		$this->db->ini();
		
		$this->tpl->assign('email',$this->db->email != '' ? $this->db->email : ' Endere&ccedil;o n&atilde;o informado. ' );
		$this->tpl->assign('msn',$this->db->msn != '' ? $this->db->msn : ' Endere&ccedil;o n&atilde;o informado. ');
		$this->tpl->assign('skp',$this->db->skp != '' ? $this->db->skp : ' Endere&ccedil;o n&atilde;o informado. ');
		$this->tpl->assign('twitter',$this->db->twitter != '' ? $this->db->twitter : ' Endere&ccedil;o n&atilde;o informado. ');
		
		return $this->tpl->getOutputContent();
	}
}
?>